Skip to content

fix(when): report a --when the read-back cannot place as not confirmed - #453

Merged
ryanlewis merged 1 commit into
mainfrom
fix/when-unconfirmed
Oct 10, 2026
Merged

ryanlewis merged 1 commit into
mainfrom
fix/when-unconfirmed

Conversation

@ryanlewis

Copy link
Copy Markdown
Owner

The read-back's whenCheck.holds treats a value placeWhen cannot model as held, so add, project add and edit reported "confirmed" for a weekday name, a weekday or evening with a time, or a phrase Things understood, after checking only that Things applied the write.

Cut from origin/main; it does not depend on #449.

Changes

  • whenPlaced (when.go) says whether a value, as sent, is one placeWhen models: anytime, someday, today, evening, tomorrow, empty, HH:MM, a date, or a date and time.
  • add / project add: when the item is found and the --when is not one of those, warn on stderr with where the item is and report it not confirmed, exit 0, with the item's uuid.
  • edit / project edit: once the read-back sees the edit applied, the same. The existing phrase-only edit path (reason: when) is unchanged, and the new case reuses its output shape (printUnconfirmedEdit) and reason.
  • Values the read-back does place are judged as before. A phrase Things ignored (no start date) still warns and prints the item, as before.
  • Docs: agents.md, commands.md, SKILL.md.

Before / after

things add "Buy oat milk" --when friday, which Things files on Friday:

  • before: the item printed as things show would (confirmed).
  • after: stderr warning: the CLI cannot check where --when "friday" files an item, so the to-do is not confirmed; it was created scheduled for 2026-10-16. Run things show to check. stdout Created, not confirmed (--when not checked): "Buy oat milk" (<uuid>). Under --json: {"uuid": "<uuid>", "title": "Buy oat milk", "confirmed": false, "reason": "when"}.

things edit <uuid> --when evening@6pm --notes x, once applied: Applied, not confirmed (--when not checked): "…" (<uuid>), with the same JSON shape.

Tests

TestAddWhenUnplaced (friday, friday@18:00, evening@6pm, for to-dos and projects in both output modes, plus a date@time that is still confirmed), TestEditWhenUnplaced, and TestAddWhenPhraseIgnored updated: a phrase Things understood is now unconfirmed. make test and make lint pass.

@ryanlewis
ryanlewis merged commit 9ef43c4 into main Oct 10, 2026
10 checks passed
@ryanlewis
ryanlewis deleted the fix/when-unconfirmed branch October 10, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant